#pragma once
#include "ridefactory.h"
#include "sgcomposite.h"
#include "sgptr.h"
#include "sgrotate.h"
#include "sgrotatearoundpoint.h"

class YoYoFactory :	public RideFactory
{
	public:
		YoYoFactory();
		~YoYoFactory(void);
		virtual CSgObject* Create();
		virtual void AdvanceTime(const DWORD &, const DWORD &);
		CSgPtr<CSgComposite> MakeTower();
		CSgPtr<CSgComposite> MakeSeat();
		CSgPtr<CSgComposite> MakeChains(int);
		CSgPtr<CSgComposite> MakeBeams();
		CSgPtr<CSgComposite> MakeTop();
		CSgPtr<CSgComposite> MakeBeam(float, float, float);
		double modulus(double a, double b);
	private:

		CSgPtr<CSgComposite> m_ride;
		CTexture * m_towerTexture;
		CTexture * m_yoyologo;
		CTexture * m_carnivalside;
		CTexture * m_happy;
		float m_ChairRotation;
		float m_BeamRotation;
		float m_SpinRotation;
		float m_TopSpin;
		

		// animation points (Andrew)
		CSgPtr<CSgRotateAroundPoint> m_rotate_point_rpt[16];
		CSgPtr<CSgRotate> m_rotate_point_r2[16];
		CSgPtr<CSgRotateAroundPoint> m_rotate_point_rpt3[16];
		CSgPtr<CSgRotateAroundPoint> m_rotate_point_rpt2[16];
		CSgPtr<CSgRotate> m_rotate_point_r3[16];
		CSgPtr<CSgRotateAroundPoint> m_rotate_point_rpt8[16];
		CSgPtr<CSgRotateAroundPoint> m_rotate_point_rpt6[16];
		CSgPtr<CSgRotate> m_rotate_point_r4[16];
		CSgPtr<CSgRotate> m_rotate_point_r10[16];
};
